var t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
    return typeof t;
} : function(t) {
    return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, e = {};

e.sorting = function(e) {
    var n = getCurrentPages().pop(), o = n.data.albumSoldOutList || [], r = [], i = [];
    if (e && "object" == (void 0 === e ? "undefined" : t(e)) && e.length > 0) {
        for (var u = 0; u < e.length; u++) 1 == e[u].child.status ? r.push(e[u]) : i.push(e[u]);
        return n.data.albumSoldOutList = o.concat(i), r;
    }
    return n.data.albumSoldOutList = o.concat(i), r;
}, e.soldOutSorting = function(e) {
    var n = [];
    if (e && "object" == (void 0 === e ? "undefined" : t(e)) && e.length > 0) {
        for (var o = 0; o < e.length; o++) 1 != e[o].child.status && n.push(e[o]);
        return n;
    }
    return n;
}, e.findOrderWithinAMonth = function(t) {
    var e = new Date().getTime(), n = [];
    return t && t.map(function(t) {
        var o = t.curtTime;
        e - o < 5184e6 && n.push(t);
    }), n;
}, e.evenNumberList = function() {
    var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e = arguments[1], n = arguments[2], o = getCurrentPages().pop(), r = t.concat(e);
    if (o.data.lastList = [], r.length % 2 && !n) {
        var i = r.slice(0, r.length - 1), u = r.slice(r.length - 1, r.length);
        return o.setData({
            lastList: u
        }), i;
    }
    return r;
}, e.delDuplication = function() {
    var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
    return t.length > 0 ? (t.map(function(t, n) {
        e.map(function(n, o) {
            n.id == t.id && (console.log("has duplication data. id:", n.id), e.splice(o, 1));
        });
    }), e) : e;
}, e.getShopCartListId = function() {
    var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e = [];
    t.map(function(t) {
        -1 == e.indexOf(t.warehouse) && e.push(t.warehouse);
    });
    var n = [];
    return e.map(function(e, o) {
        var r = {
            warehouseName: "",
            list: [],
            chooseNum: 0
        };
        t.map(function(t, n) {
            t.warehouse == e && (r.warehouseName || (r.warehouseName = t.warehouseName), 2 == t.checkstate && r.chooseNum++, 
            r.list.push(t));
        }), n.push(r);
    }), console.log("cartListArr:", n), n;
}, e.divideArray = function() {
    for (var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 6, n = 0, o = []; n < t.length; ) o.push(t.slice(n, n += e));
    return o;
}, module.exports = e;